﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MenuItem
{
    class Beverage:MenuItemBaseClass
    {
        double smallPrice;
        double mediumPrice;
        double largePrice;

        public Beverage(string strName, double smallPrice, double mediumPrice, double largePrice):base(strName)
        {
            if (smallPrice < 0)
                throw new ArgumentOutOfRangeException("Wrong price!");
            this.smallPrice = smallPrice;
            if (mediumPrice < 0)
                throw new ArgumentOutOfRangeException("Wrong price!");
            this.mediumPrice = smallPrice;
            if (largePrice < 0)
                throw new ArgumentOutOfRangeException("Wrong price!");
            this.largePrice = smallPrice;

        }

        public override void PrintToConsole()
        {
            Console.WriteLine("{0} - Small price: ${1}; Medium price: ${2}; Large price: ${3};", Name, smallPrice, mediumPrice, largePrice);
        }
        

    }
}
